use "dataset_city_selection_louisiana", clear

tostring date, format(%tdnn/dd/ccyy) replace force
tostring pop share, format(%20.0fc) replace force

foreach x of varlist * {
	replace `x' = "\textbf{" + `x' + "}"
	replace `x' = "\cellcolor{light-gray}" + `x' if ///
		regex(parish, "Baton Rouge")
}
replace date = "\hline\hline " + date if regex(parish, "Baton Rouge")

#delimit;

listtex 
	using "_output/table A3.tex"
	,
		replace 
		type 
		rstyle(tabular) 	
		head(
		\begin{tabular}{
			l
			l
			l
			l
			>{\raggedright\arraybackslash}p{0.3\linewidth}
			}
			\toprule Date & Parish & Population & Share Black & 
				Prior Elections Used \\
			\midrule
		)
		foot("\bottomrule\end{tabular}")
		;
		
#delimit cr
